package com.atguigu07._abstract.exer2;

/**
 * ClassName: PersonTest
 * Description:
 * 1）定义一个Employee类，该类包含：
 *
 * private成员变量name,number,birthday，其中birthday为MyDate类的对象；
 * 提供必要的构造器；
 * abstract方法earnings(),返回工资数额；
 * toString()方法输出对象的name,number和birthday。
 *
 *
 * @Author liu
 * @Create 2024/11/10 10:57
 * @Version 1.0
 */
public abstract class Employee {
    private String name;
    private int number;
    private MyData birthday;

    public  Employee(){

    }

    public Employee(String name, int number, MyData birthday) {
        this.name = name;
        this.number = number;
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public MyData getBirthday() {
        return birthday;
    }

    public void setBirthday(MyData birthday) {
        this.birthday = birthday;
    }


    //abstract方法earnings(),返回工资数额；
    public abstract double earnings();

    @Override
    public String toString() {
        return "name='" + name + '\'' +
                ", number=" + number +
                ", birthday=" + birthday.toString() +
                '}';
    }
}
